package com.starinside.wp.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigInteger;
import java.util.Date;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2017/7/21
 * *******************************
 */
@Entity
@Data
@Table(name = "check_record")
@EqualsAndHashCode(callSuper = true)
public class CheckRecord extends Model {

    @Column(name = "childrenId", columnDefinition = "varchar(32) COMMENT '宝宝id'")
    private String childrenId;

    @Column(name = "checkInTime", columnDefinition = "datetime COMMENT '签到时间'")
    private Date checkInTime;

    @Column(name = "checkInMediaUrl", columnDefinition = "varchar(255) COMMENT '签到记录媒体地址'")
    private String checkInMediaUrl;

    @Column(name = "checkInStaffId", columnDefinition = "varchar(32) COMMENT '签到人id'")
    private String checkInStaffId;

    @Column(name = "checkOutTime", columnDefinition = "datetime COMMENT '签退时间'")
    private Date checkOutTime;

    @Column(name = "checkOutMediaUrl", columnDefinition = "varchar(255) COMMENT '签退记录媒体地址'")
    private String checkOutMediaUrl;

    @Column(name = "checkOutStaffId", columnDefinition = "varchar(32) COMMENT '签退人id'")
    private String checkOutStaffId;

    @Column(name = "checkType", columnDefinition = "int default 0 COMMENT '签到渠道 1，web，2，pad'")
    private Integer checkType;

    @Column(name = "status", columnDefinition = "int default 0 COMMENT '签到状态 0:缺席,1:入园,2:离园,3:拒绝入园,4:请假' ")
    private Integer status = 0;

    @Column(name = "healthyStatus", columnDefinition = "int default 0 COMMENT '健康状态 0，健康，1，不健康'")
    private Integer healthyStatus = 0;

    @Column(name = "exceptionName", columnDefinition = "varchar(255) COMMENT '异常情况'")
    private String exceptionName;

    @Column(name = "sickName", columnDefinition = "varchar(255) COMMENT '疾病名称'")
    private String sickName;

    @Column(name = "specialRecord", columnDefinition = "varchar(255) COMMENT '特殊记录'")
    private String specialRecord;

    @Column(name = "duration", columnDefinition = "bigint default 0 COMMENT '持续时长'")
    private BigInteger duration = BigInteger.valueOf(0L);

    @Column(name = "height", columnDefinition = "varchar(20) COMMENT '身高'")
    private String height;

    @Column(name = "weight", columnDefinition = "varchar(20) COMMENT '体重'")
    private String weight;

    @Column(name = "header", columnDefinition = "varchar(20) COMMENT '头围'")
    private String header;

    @Column(name = "created", columnDefinition = "datetime COMMENT '创建时间'")
    private Date created = new Date();
}
